#!/usr/bin/python3

import uuid
import strict_winbcd
import strict_winbcd.objects
import shutil

obj = strict_winbcd.BCD("/home/fpemud/test10/stage4-mswin_7/partition0.mntdir/Boot/BCD")
a = open("a.txt", "w")
for path, keys, vals in obj._nav.walk():
    for k, v in strict_winbcd.objects.knownguids.items():
        path = path.replace(k, v[0])
    print(path, file=a)
    for k, v in vals.items():
        print(" " * len(path), k, v, file=a)

print(obj.description, file=a)
print(obj.default, file=a)
print(obj.osloaders, file=a)
print(obj.objects, file=a)
a.close()



obj = strict_winbcd.BCD("/home/fpemud/test10/stage4-mswin_7/partition0.mntdir/Boot/BCD.bak")
a = open("b.txt", "w")
for path, keys, vals in obj._nav.walk():
    for k, v in strict_winbcd.objects.knownguids.items():
        path = path.replace(k, v[0])
    print(path, file=a)
    for k, v in vals.items():
        print(" " * len(path), k, v, file=a)

print(obj.description, file=a)
print(obj.default, file=a)
print(obj.osloaders, file=a)
print(obj.objects, file=a)
a.close()
